package com.firewolf.fr.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.firewolf.fr.pojo.Mobile;
import com.firewolf.fr.service.impl.TestServiceImpl;

@Controller
public class TestController {

	@Autowired
	private TestServiceImpl service;

	/**
	 * 通用请求，跳转页面即可
	 * 
	 * @param model
	 * @return
	 */
	@RequestMapping("/test")
	public String test(Model model, String keyWords) {
		List<Mobile> mList = service.searchMobile(keyWords);
		model.addAttribute("mList", mList);
		return "list";
	}
}
